import React, { Component } from "react";
import { View } from "@tarojs/components";
import "./ListItem.scss";

export default class Banner extends Component {
  constructor(props) {
    super(props);
  }

  handleClick(id) {
    this.props.goDetail(id);
  }

  render() {
    return (
      <View className='ListItem'>
        {this.props.lists.map((item) => {
          return (
            <View
              className='items'
              key={item.id}
              onClick={() => {
                this.handleClick(item.id);
              }}
            >
              {item.title}
            </View>
          );
        })}
      </View>
    );
  }
}
